home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 5 / Gold Medal Software - Volume 5 (Gold Medal) (1995).iso / utils1 / drawplay.arj / MANUAL.TXT < prev    next >
Text File  |  1994-11-01  |  15KB  |  445 lines

  1. DRAW                                 Michael J. Mefford
  2. Draws graphics from DOS prompt or batch files
  3. -------------------------------------------------------
  4.  
  5. Purpose
  6. -------
  7. Provides low-resolution (320 x 200) color or high-
  8. resolution (640 x 200) monochrome drawing capabilities
  9. on CGA, EGA and VGA systems, without the need to work
  10. in BASIC.
  11.  
  12. Format
  13. ------
  14.  
  15.     DRAW [/K]                (Option I)
  16.  
  17.     DRAW string [/K]         (Option II)
  18.  
  19.     DRAW filespec/F [/K]     (Option III)
  20.  
  21. Remarks
  22. -------
  23. Entered at the DOS prompt with no arguments on the
  24. command line (Option I), DRAW looks in the current
  25. directory for a file named DRAW.DAT and executes the
  26. commands in that file. A sample DRAW.DAT file is
  27. included on this disk. The file can be examined, and
  28. similar files created, with a regular ASCII word
  29. processor.
  30.  
  31. Alternatively, DRAW can be entered with a string of
  32. commands (Option II) for a simple graphic or with the
  33. name of a file consisting of commands (Option III).
  34. Any legal DOS filename may be used, and full path
  35. support is provided, but a /F terminator must be
  36. appended to the filename. An optional /K may be added
  37. to prevent a keystroke from halting execution.
  38.  
  39. Example
  40. -------
  41. You can get a feel for how DRAW operates by entering,
  42. at the DOS prompt:
  43.  
  44.     DRAW X0 C2 BU50 M+40,70 L80 M+40,-70 BD5 P2,2
  45.  
  46. This will create a red triangle in the middle of your
  47. screen. You can trace the specific steps in this
  48. command sequence by referring to The DRAW Command Set
  49. table below.
  50.  
  51. The DRAW Command Set
  52. --------------------
  53. Xn   Change to low resolution 320X200 color graphics.
  54.  
  55.      If X is not found, the default is 640X200 high
  56.      resolution black and white graphics. X must be
  57.      the first character of the command line or the
  58.      first character in a file.
  59.  
  60.      The palette will be changed to n, where n can be
  61.      either zero or one. See C color command below for
  62.      the color of each palette.
  63.  
  64. K    Do not poll the keyboard while drawing. If K is
  65.      not found, any keystroke terminates the program.
  66.  
  67. Sn   Flood the screen color to pattern n. n must be a
  68.      decimal number in the range 0-255, and represents
  69.      an eight bit pattern. Normally this command is
  70.      issued immediately after the X command (if
  71.      present), to clear the screen with a background
  72.      color other than black. For example, to clear to
  73.      color red (2) in low resolution, the command is
  74.      S170 (binary 10101010).
  75.  
  76.          color          320X200          640X200
  77.            0               0                0
  78.            1              85              255
  79.            2             170               NA
  80.            3             255               NA
  81.  
  82.      Pattern colors may also be used. For example, a
  83.      pattern of half green and half black would be S58
  84.      (binary 01000100). In high resolution, each bit
  85.      represents a dot, eight dots per byte. This is
  86.      why only two colors (black or white) are
  87.      available. In low resolution, there are two bits
  88.      per dot, so four combinations can be represented.
  89.      In the example here the sequence is 01 (green), 00
  90.      (black), 01 (green), 00 (black). See C (color)
  91.      command below for complete coding of the colors.
  92.  
  93. U,D,L,R,E,F,G,H
  94.      These commands, followed by a number, will move in
  95.      one of the following compass directions:
  96.  
  97.                           U
  98.                   H       |       E
  99.                     \     |     /
  100.                       \   |   /
  101.                         \ | /
  102.                L -- -- -- + -- -- -- R
  103.                         / | \
  104.                       /   |   \
  105.                     /     |     \
  106.                   G       |       F
  107.                           D
  108.  
  109. Mx,y Move x,y units either relative to the current
  110.      position or to the absolute coordinates, x,y. If
  111.      the x coordinate is prefaced with either a plus
  112.      sign or minus sign, the move is relative.
  113.      Otherwise, the move is absolute. Note, you do not
  114.      need to include a plus sign in front of the y
  115.      coordinate in a positive y move.
  116.  
  117. Pp,b Paint the color p until the border color b is
  118.      found. The paint originates from the current
  119.      position.
  120.  
  121. B    Blank move. The move following a B will move the
  122.      desired units without plotting points. The next
  123.      command will then continue drawing.
  124.  
  125. N    No update. The draw command following an N
  126.      command will plot points, but the position will
  127.      not be updated. The next draw command will start
  128.      at the same position as the last.
  129.  
  130. Cn   Change the color to n. All draws after a C
  131.      command will be in color n. n can be 0 (black) or
  132.      1 (white) in high resolution and 0 to 3 in low
  133.      resolution. In low resolution, the color is
  134.      dependent on the palette.
  135.  
  136.                        320X200                 640X200
  137.      color     palette 0     palette 1
  138.        0         black         black            black
  139.        1         green         cyan             white
  140.        2         red           magenta          NA
  141.        3         yellow        white            NA
  142.  
  143. Related programs
  144. ----------------
  145. This disk also includes BLOAD, BSAVE, VIDMODE and PLAY
  146. programs which can be used with DRAW to create quite
  147. sophisticated presentations within batch files.
  148.  
  149. The command
  150.  
  151.     BSAVE filespec
  152.  
  153. saves a byte image of the screen buffer to a file
  154. (with optional drive and path specifications), and
  155.  
  156.     BLOAD filespec
  157.  
  158. loads a saved image file back to the screen buffer.
  159.  
  160. VIDMODE can be used in a batch file with BLOAD
  161. to set the appropriate display resolution (VIDMODE 4
  162. for low res, VIDMODE 6 for high res). The PLAY
  163. utility plays a tune on the PC's speaker.
  164.  
  165. Example
  166. -------
  167. This disk includes the example DRAW and PLAY files
  168. MOVIE.DAT and STING.DAT so that you can try the
  169. this example. Create the following batch file,
  170. SAVE.BAT, using an ASCII word processor, EDLIN, or
  171. COPY CON:
  172.  
  173.     ECHO OFF
  174.     DRAW MOVIE.DAT/F
  175.     BSAVE PICTURE
  176.  
  177. Enter SAVE and the batch file will create a saved
  178. screen image called PICTURE of the MOVIE.DAT drawing.
  179. Now, similarly create a second batch file, SHOW.BAT:
  180.  
  181.     ECHO OFF               (turn off command display)
  182.     VIDMODE 4              (select low res graphics)
  183.     BLOAD PICTURE          (load the image)
  184.     PLAY STING.DAT/F       (play the tune)
  185.     PAUSE > NUL            (wait for a keypress)
  186.     VIDMODE 3              (back to text screen)
  187.  
  188. If you now enter SHOW at the DOS prompt the picture
  189. of two con men will appear, with appropriate musical
  190. background. Pressing any keystroke will clear the
  191. display.
  192.  
  193. Note
  194. ----
  195.  
  196. 1. The PAUSE > NUL line in SHOW.BAT waits for a
  197.    keystroke without showing a message on the
  198.    display. This will not work properly on DOS
  199.    versions prior to DOS 3.
  200.  
  201.  
  202. BLOAD and BSAVE
  203. Save and reload the screen display
  204. -------------------------------------------------------
  205.  
  206. Purpose
  207. -------
  208. Similar to the BASIC commands of the same name, these
  209. two programs provide a simple ability to save and
  210. reload screen displays. They are included here for
  211. use with the DRAW program.
  212.  
  213. Format
  214. ------
  215.  
  216.     BSAVE filename
  217.  
  218. then
  219.  
  220.     BLOAD filename
  221.  
  222. Remarks
  223. -------
  224. BSAVE stores the currently displayed screen in a file.
  225. The BLOAD command can then be used to reload it. If
  226. the screen is a graphic image, you should use the
  227. VIDMODE command included on this disk to set
  228. the appropriate display mode before using BLOAD.
  229.  
  230. BLOAD and BSAVE can be used in batch files to
  231. quickly display complete screens or drawings.
  232. See the DRAW command for more information.
  233.  
  234.  
  235. PLAY                                 Michael J. Mefford
  236. Plays tones and tunes on the PC's speaker
  237. -------------------------------------------------------
  238.  
  239. Purpose
  240. -------
  241. Provides many of the music-producing functions of the
  242. BASIC PLAY statement without the need to work in
  243. BASIC.
  244.  
  245. Format
  246. ------
  247.  
  248.     PLAY[/K]              (Option I)
  249.  
  250.     PLAY string[/K]       (Option II)
  251.  
  252.     PLAY filespec/F[/K]   (Option III)
  253.  
  254. Remarks
  255. -------
  256. Entered at the DOS prompt with no arguments on the
  257. command line (Option I), PLAY looks in the current
  258. directory for a file named PLAY.DAT and executes the
  259. commands in that file. The PLAY.DAT file included on
  260. this disk is "Greensleeves."  The file can be
  261. examined, and similar files created, with a regular
  262. ASCII word processor.
  263.  
  264. Alternatively, PLAY can use either a command-line
  265. string (Option II) or any legal DOS filename (Option
  266. III) to supply the music command arguments. Filenames
  267. may include a path designation, but must include the
  268. /F terminator. A sample file "score," STING.DAT is
  269. contained on this disk.
  270.  
  271. Pressing any key while PLAY is executing will
  272. terminate operation unless the /K switch has been
  273. added.
  274.  
  275. The command set used with PLAY is shown on the
  276. following page and is exemplified in the PLAY.DAT and
  277. STING.DAT files.
  278.  
  279. The PLAY Command Set
  280. --------------------
  281. K   Keyboard. K will cause PLAY not to poll the
  282.     keyboard during play. If K is not found, any
  283.     keystroke will exit.
  284.  
  285. On  Octave. n is a decimal number between 0 and 6.
  286.     Middle C starts 03. The default is 04.
  287.  
  288. Ln  Length of time the notes will be played until the
  289.     next L command is encountered. n is a decimal
  290.     number between 1 and 64. For example, L4 =
  291.     quarter-note and L8 = eighth note.
  292.  
  293. Tn  Tempo is the pace at which the music is played.
  294.     n is a decimal number between 32 and 255. The
  295.     larger the number, the faster the pace. The default
  296.     is T120.
  297.  
  298. A-G Letter names corresponding to the notes of the
  299.     scale. The letter name may be followed by
  300.     either a # or + for a sharp, or a - for a flat.
  301.     O3C = middle C.
  302.  
  303. Nn  Note to be played. n is a decimal number between
  304.     1 and 84. Each increment is 1/12 of an octave. N
  305.     can be used as an alternative to defining a note
  306.     by a letter and an octave. For example, N37 =
  307.     middle C.
  308.  
  309. Pn  Pause, or rest, for a length defined by n. P works
  310.     in the same way as the L command above. For
  311.     example, P2 = a half rest.
  312.  
  313. MN  Music Normal. The note is played 7/8 of its
  314.     specified time, and 1/8 is a rest between notes.
  315.     This is the default.
  316.  
  317. ML  Music Legato. The note is played the full length of
  318.     time specified.
  319.  
  320. MS  Music Staccato. The note is played 3/4 of the time
  321.     specified, and 1/4 is a rest between notes.
  322.  
  323. .   Dot. A dot can follow a letter note or a pause. A
  324.     dotted note increases play time by half the duration
  325.     of the note or pause. More than one dot may be used.
  326. VIDMODE                                 Charles Petzold
  327. Sets/displays the current video mode
  328. -------------------------------------------------------
  329.  
  330. Purpose
  331. -------
  332. Reports/changes the current video mode.
  333.  
  334. Format
  335. ------
  336.  
  337.     VIDMODE m
  338.  
  339. Remarks
  340. -------
  341. Entered without the optional m parameter, VIDMODE
  342. displays the current video mode. In text modes, the
  343. commands VIDMODE 03 and VIDMODE 07 have the same
  344. practical effect as the DOS commands MODE CO80 and
  345. MODE MONO respectively. The table below lists the m
  346. (mode) parameters to which VIDMODE can be switched.
  347.  
  348. Mode  Type   Disp.   Resol.  Chars  Box   Colors  Pgs.
  349. ----  ----   -----  -------  -----  ---   ------  ---
  350. 0&1   Text   CGA     200x320  25x40   8x8   16    8
  351.              EGA     350x320  25x40  14x8   16    8
  352.              VGA     400x360  25x80  16x9   16    8
  353. 2&3   Text   CGA     200x640  25x80   8x8   16    8
  354.              EGA     350x640  25x80  14x8   16    8
  355.              VGA     400x720  25x80  16x9   16    8
  356. 4&5   Graph  CGA+    200x320  25x40   8x8    4    1
  357.  6    Graph  CGA+    200x640  25x80  14x8    2    1
  358.  7    Text   MDA     350x720  25x80  14x9    4    8
  359. 8-12  ------------ Reserved/PCjr modes ------------
  360. 13    Graph  EGA+    200x320  25x40   8x8   16    8
  361. 14    Graph  EGA+    200x640  25x80   8x8   16    4
  362. 15    Graph  EGA     350x640  25x80  14x8    4    1
  363. 16    Graph  EGA+    350x640  25x80  14x8   16    2
  364. 17    Graph  MCGA+   480x640  25x80  14x8    2    1
  365. 18    Graph  VGA     480x640  25x80  14x8   16    1
  366. 19    Graph  MCGA+   200x320  25x40  14x8  256    1
  367.  
  368. Notes
  369. -----
  370.  
  371. 1. Users of a Hercules graphics card can
  372.    activate "page 1" graphics if an EGA/VGA
  373.    is installed with the command sequence:
  374.  
  375.                     MODE CO80
  376.                     VIDMODE 16
  377.                     ...
  378.                     MODE MONO
  379.  
  380.    Use VIDMODE 14 if your EGA is connected
  381.    to a conventional color monitor.
  382.  
  383. 2. Should you switch to a mode not supported
  384.    by your monitor, you can recover by blindly
  385.    entering VIDMODE 3 (color) or VIDMODE 7
  386.    (monochrome).
  387.  
  388. 3. By adding 128 to the mode number desired you
  389.    can change modes without clearing the screen
  390.    (though the cursor is reset to the upper
  391.    left). These high numbered modes may confuse
  392.    some applications programs, however.
  393.  
  394. 4. VIDMODE will switch to 'super VGA' modes if
  395.    your display has them provided that you know
  396.    the correct mode number to use. Your display
  397.    card manual should list these. WARNING: You
  398.    should be careful not to select Super VGA modes
  399.    that your monitor is not designed to handle.
  400.    Some Super VGA cards do not provide protection
  401.    against this and it can cause damage to your
  402.    monitor.
  403.  
  404. 5. VIDMODE was formerly called EGAMODE.
  405. @@VIDPAGE
  406. VIDPAGE                                 Charles Petzold
  407. Sets/displays the current video page
  408. -------------------------------------------------------
  409.  
  410. Purpose
  411. -------
  412. Reports/changes the current video page.
  413.  
  414. Format
  415. ------
  416.  
  417.     VIDPAGE p
  418.  
  419. Remarks
  420. -------
  421. Entered without the optional p parameter, VIDPAGE
  422. reports which video page is currently active. The
  423. chart presented in this manual for VIDMODE shows
  424. which video pages (p parameters, beginning with 0) can
  425. be used in each mode.
  426.  
  427. VIDPAGE can be useful when you have material on your
  428. screen to which you want to return later. Entering
  429. VIDPAGE 1 activates a new screen while retaining the
  430. contents of the default VIDPAGE 0 in memory. The
  431. previous display can subsequently be recalled by
  432. issuing the VIDPAGE 0 command.
  433.  
  434. Notes
  435. -----
  436.  
  437. 1. When using an alternate video page do not change
  438.    video modes (e.g. with MODE CO80) or the previous
  439.    display contents will be lost.
  440.  
  441. 2. ANSI.SYS cannot be used with other than video
  442.    page 0.
  443.  
  444. 3. VIDPAGE was formerly called EGAPAGE
  445.